<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<c:set var="grant_code"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
<c:set var="sub_grant_code"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>

<div class="t_bar">经费筹集情况（单位：万元）</div>
<table class="table01 t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1">
	<tr>
	    <td width="111" align="right">总投入经费：</td>
		<td colspan="8">
			<input id="budget_alltotal" name="budget/total" label="总投入经费" type="text"  disabled
					class="input_text required maxlength:20 gray"  style="text-align:right;width:200px;" maxlength="50" 
					onfocus="InitInput.setNumber(this,10,0,0)"
					value="<x:out select="$xmlData/data/budget/total" />" /> 
		</td>
	</tr>
	<tr>
		<th rowspan="2" width="10%">&nbsp;</th>
		<th rowspan="2" width="10%"><span class="color_red">*</span>自有资金</th>
		<th rowspan="2" width="10%"><span class="color_red">*</span>贷款</th>
		<th rowspan="2" width="10%"><span class="color_red">*</span>境外资金</th>
		<th colspan="3" width="30%">政府部门</th>
		<th rowspan="2" width="10%"><span class="color_red">*</span>其他</th>
		<th rowspan="2" width="10%">合计</th>
	</tr>
	<tr>
	    <th><span class="color_red">*</span>省科技厅</th>
		<th><span class="color_red">*</span>市县配套</th>
		<th><span class="color_red">*</span>其它部门</th>
	</tr>
	<tr>
	    <td align="center">
		           已投入经费
		</td>
		<td align="center">
		    <input name="budget/budget_own" id="budget_own" type="text" label="经费筹集情况中已投入的自有资金经费" class=" input_text required maxlength:20" style="text-align:right;width:50px" value="<x:out select="$xmlData/data/budget/budget_own" />"  
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('budget_','own,loan,outside,province,city,otherdepartment,other','total');synamt('total_invest_0','budget_total','budget_alltotal')"/>
		</td>
		<td align="center">
		    <input name="budget/budget_loan" id="budget_loan" type="text" label="经费筹集情况中已投入的贷款经费" class=" input_text required maxlength:20" style="text-align:right;width:50px" value="<x:out select="$xmlData/data/budget/budget_loan" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('budget_','own,loan,outside,province,city,otherdepartment,other','total');synamt('total_invest_0','budget_total','budget_alltotal')"/>
		</td>
		<td align="center">
		    <input name="budget/budget_outside" id="budget_outside" type="text" label="经费筹集情况中已投入的境外资金经费" class=" input_text required maxlength:20" style="text-align:right;width:50px" value="<x:out select="$xmlData/data/budget/budget_outside" />"
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('budget_','own,loan,outside,province,city,otherdepartment,other','total');synamt('total_invest_0','budget_total','budget_alltotal')"/>
		</td>
		<td align="center">
		    <input name="budget/budget_province" id="budget_province" type="text" label="经费筹集情况中已投入的省科技厅经费" class=" input_text required maxlength:20" style="text-align:right;width:50px" value="<x:out select="$xmlData/data/budget/budget_province" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('budget_','own,loan,outside,province,city,otherdepartment,other','total');synamt('total_invest_0','budget_total','budget_alltotal')"/>
		</td>
		<td align="center">
		    <input name="budget/budget_city" id="budget_city" type="text" label="经费筹集情况中已投入的市县配套经费" class=" input_text required maxlength:20" style="text-align:right;width:50px" value="<x:out select="$xmlData/data/budget/budget_city" />"
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('budget_','own,loan,outside,province,city,otherdepartment,other','total');synamt('total_invest_0','budget_total','budget_alltotal')"/>
		</td>
		<td align="center">
		    <input name="budget/budget_otherdepartment" id="budget_otherdepartment" type="text" label="经费筹集情况中已投入的其它部门经费" class=" input_text required maxlength:20" style="text-align:right;width:50px" value="<x:out select="$xmlData/data/budget/budget_otherdepartment" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('budget_','own,loan,outside,province,city,otherdepartment,other','total');synamt('total_invest_0','budget_total','budget_alltotal')"/>
		</td>
		<td align="center">
		    <input name="budget/budget_other" id="budget_other" type="text" label="经费筹集情况中已投入的其他经费" class=" input_text required maxlength:20" style="text-align:right;width:50px" value="<x:out select="$xmlData/data/budget/budget_other" />"  
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('budget_','own,loan,outside,province,city,otherdepartment,other','total');synamt('total_invest_0','budget_total','budget_alltotal')"/>
		</td>
		<td align="center">
		    <input name="budget/budget_total" id="budget_total"  type="text" class="gray" disabled style="text-align:right;width:50px" value="<x:out select="$xmlData/data/budget/budget_total" />"/>
		</td>
	</tr>
	<tr>
	     <td align="right">政府部门、境外资金及其他资金投入情况说明：（限1000字）</td>
	     <td colspan="8">
	     <textarea id="brief" name="budget/invest_detail/brief" rows=7 cols=100 class="maxlength:1000" label="政府部门、境外资金及其他资金投入情况说明"
	     ><x:out select="$xmlData/data/budget/invest_detail/brief" /></textarea>
	     </td>
	</tr>
</table>
<br>
<div class="t_bar"><span class="color_red">*</span>经费支出预算（单位：万元）</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1">

	<tr class="t_tr">
		<td align="center" width="220">科目</td>
		<td class="TblHead" align="center" width="120">预算数（万元）</td>
		<td class="TblHead" align="center"width="120">其中科技拨款（万元）</td>
	</tr>
	<tr class="li_1">
		<td align="left"><strong>支出预算合计：</strong></td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[00]@invest_code"  value="00">
			<input type="hidden" name="budget/invest_detail/invest[00]/name" value="支出预算合计">
			<input type="text" name="budget/invest_detail/invest[00]/total_invest"disabled id="total_invest_0" 
					class="gray" disabled style="text-align:right; width:230px;" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='00']/total_invest" />" 
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[00]/total_allot"
					 disabled id="total_allot_0" class="gray "
				 	 value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='00']/total_allot" />"
			/>
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:20px">1、设备费</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[01]@invest_code"  value="01">
			<input type="hidden" name="budget/invest_detail/invest[01]/name" value="设备费">
			<input type="text" name="budget/invest_detail/invest[01]/total_invest"  id="total_invest_1"
			 class="gray"  label="设备费预算" disabled style="text-align:right; width:230px;"  
			 value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='01']/total_invest" />" 
			 onchange="countFund('total_invest_','1,2,5,10,11','0');" 
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[01]/total_allot"
					 id="total_allot_1" class="gray"  disabled 
					 value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='01']/total_allot" />"
				onchange="countFund('total_allot_','1,4,9,10,11,12','0');" 
			>
		</td>
	</tr>
	<tr class="li_1">
		<td align="left" style="padding-left:40px">(1) 购置费：</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[02]@invest_code" value="0101" />
			<input type="hidden" name="budget/invest_detail/invest[02]/name" value="购置费" />
			<input type="text" name="budget/invest_detail/invest[02]/total_invest" id="total_invest_2" 
					style="text-align:right; width:230px;"
					class="required" label="购置费预算" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0101']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','2,3','1');countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"  />
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[02]/total_allot" 
					id="total_allot_2" onfocus="InitInput.setNumber(this,7,4,4)" 
					class="required" label="购置费预算中科技拨款" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0101']/total_allot" />"
			onchange="countFund('total_allot_','2,3','1');countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')"  />
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:40px">(2) 试制费：</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[03]@invest_code" value="0102" />
			<input type="hidden" name="budget/invest_detail/invest[03]/name" value="试制费" />
			<input  type="text" name="budget/invest_detail/invest[03]/total_invest"  id="total_invest_3"  
					class="required" label="试制费预算" 
					style="text-align:right; width:230px;" value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0102']/total_invest" />"
					onfocus="InitInput.setNumber(this,7,4,4)"  
					onchange="countFund('total_invest_','2,3','1');countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			 />
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" id="total_allot_3"  name="budget/invest_detail/invest[03]/total_allot"  
					class="required" label="试制费预算中科技拨款"
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0102']/total_allot" />"  
					onfocus="InitInput.setNumber(this,7,4,4)"    
					onchange="countFund('total_allot_','2,3','1');countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')"  
			/>
		</td>
	</tr>
	
	<tr class="li_1">
		<td align="left" style="padding-left:20px">2.相关业务费：</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[04]@invest_code"  value="04">
			<input type="hidden" name="budget/invest_detail/invest[04]/name" value="相关业务费">
			<input type="text" name="budget/invest_detail/invest[04]/total_invest" 
				 label="相关业务费预算" class="gray" disabled id="total_invest_4" 
				style="text-align:right; width:230px;" 
				value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='04']/total_invest" />" 
				onchange="countFund('total_invest_','1,4,9,10,11,12','0');" 
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[04]/total_allot"  id="total_allot_4" 
			onfocus="InitInput.setNumber(this,7,4,4)"  label="相关业务费预算中科技拨款" class="gray" disabled 
			value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='04']/total_allot" />"
			onchange="countFund('total_allot_','1,4,9,10,11,12','0');" 
			>
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:40px">(1) 材料费：</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[05]@invest_code" value="0401" />
			<input type="hidden" name="budget/invest_detail/invest[05]/name" value="材料费" />
			<input  type="text" name="budget/invest_detail/invest[05]/total_invest"
					class="required"  label="材料费预算"  id="total_invest_5" style="text-align:right; width:230px;" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0401']/total_invest" />" 
					onfocus="InitInput.setNumber(this,7,4,4)" 
				onchange="countFund('total_invest_','5,6,7,8','4');countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[05]/total_allot"id="total_allot_5"  
				onfocus="InitInput.setNumber(this,7,4,4)"
				class="required"  label="材料费预算中科技拨款"  
				value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0401']/total_allot" />" 
				onchange="countFund('total_allot_','5,6,7,8','4');countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')" 
			/>
		</td>
	</tr>
	<tr class="li_1">
		<td align="left" style="padding-left:40px">(2) 燃料及动力费：</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[06]@invest_code" value="0402" />
			<input type="hidden" name="budget/invest_detail/invest[06]/name" value="燃料及动力费" />
			<input  type="text" name="budget/invest_detail/invest[06]/total_invest" id="total_invest_6"
					class="required" label="燃料及动力费预算"  style="text-align:right; width:230px;" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0402']/total_invest" />" onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','5,6,7,8','4');countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[06]/total_allot" id="total_allot_6" 
					class="required" label="燃料及动力费预算中科技拨款" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0402']/total_allot" />" 
					onfocus="InitInput.setNumber(this,7,4,4)"
					onchange="countFund('total_allot_','5,6,7,8','4');countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')" 
			/>
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:40px">(3)	测试及化验费：</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[07]@invest_code" value="0403" />
			<input type="hidden" name="budget/invest_detail/invest[07]/name" value="测试及化验费" />
			<input  type="text" name="budget/invest_detail/invest[07]/total_invest" id="total_invest_7" 
					class="required" label="测试及化验费预算"  style="text-align:right; width:230px;" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0403']/total_invest" />" 
					style="text-align:right;"
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','5,6,7,8','4');countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[07]/total_allot" id="total_allot_7" 
					class="required" label="测试及化验费预算中科技拨款" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0403']/total_allot" />" 
					onfocus="InitInput.setNumber(this,7,4,4)"
					onchange="countFund('total_allot_','5,6,7,8','4');countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')" 
			/>
		</td>
	</tr>
	<tr class="li_1">
		<td align="left" style="padding-left:40px">(4) 	会议差旅费：</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[08]@invest_code" value="0404" />
			<input type="hidden" name="budget/invest_detail/invest[08]/name" value="会议差旅费预算" />
			<input  type="text" name="budget/invest_detail/invest[08]/total_invest" id="total_invest_8"
					class="required" label="会议差旅费预算"  style="text-align:right; width:230px;" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0404']/total_invest" />" 
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','5,6,7,8','4');countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[08]/total_allot" id="total_allot_8"  
					class="required" label="会议差旅费预算中科技拨款" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='0404']/total_allot" />" 
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_allot_','5,6,7,8','4');countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')" 
			/>
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:20px">3、出版/文献/信息传播/知识产权事务费</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[09]@invest_code"  value="09">
			<input type="hidden" name="budget/invest_detail/invest[09]/name" value="出版/文献/信息传播/知识产权事务费">
			<input type="text" name="budget/invest_detail/invest[09]/total_invest"
					 class="required" label="出版/文献/信息传播/知识产权事务费预算"  style="text-align:right; width:230px;"
					 onfocus="InitInput.setNumber(this,7,4,4)" id="total_invest_9" 
					 value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='09']/total_invest" />" 
					onchange="countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[09]/total_allot"
					class="required" label="出版/文献/信息传播/知识产权事务费预算中科技拨款" id="total_allot_9" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='09']/total_allot" />"
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')">
		</td>
	</tr>
	<tr class="li_1">
		<td align="left" style="padding-left:20px">4、劳务费</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[10]@invest_code"  value="10">
			<input type="hidden" name="budget/invest_detail/invest[10]/name" value="劳务费">
			<input type="text" name="budget/invest_detail/invest[10]/total_invest"
					 class="required" label="劳务费预算"  style="text-align:right; width:230px;"
					 onfocus="InitInput.setNumber(this,7,4,4)" id="total_invest_10" 
					 value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='10']/total_invest" />" 
					onchange="countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[10]/total_allot"
					class="required" label="劳务费预算中科技拨款" id="total_allot_10" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='10']/total_allot" />"
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')">
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:20px">5、管理费</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[11]@invest_code"  value="11">
			<input type="hidden" name="budget/invest_detail/invest[11]/name" value="管理费">
			<input type="text" name="budget/invest_detail/invest[11]/total_invest"
					 class="required" label="管理费预算"  style="text-align:right; width:230px;"
					 onfocus="InitInput.setNumber(this,7,4,4)" id="total_invest_11" 
					 value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='11']/total_invest" />" 
					onchange="countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" name="budget/invest_detail/invest[11]/total_allot"
					class="required" label="管理费预算中科技拨款" id="total_allot_11" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='11']/total_allot" />"
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')">
		</td>
	</tr>
		<tr class="li_1">
		<td align="left" style="padding-left:20px">6、其他</td>
		<td>
			<input type="hidden" name="budget/invest_detail/invest[12]@invest_code"  value="12">
			<input type="hidden" name="budget/invest_detail/invest[12]/name" value="其他费用">
			<input type="text" name="budget/invest_detail/invest[12]/total_invest" id="total_invest_12" 
					class="required" label="其他费用预算"  
					onfocus="InitInput.setNumber(this,7,4,4)" style="text-align:right; width:230px;" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='12']/total_invest" />" 
					onchange="countFund('total_invest_','1,4,9,10,11,12','0');synkjpk('total_invest_0','total_source_0');synamt('total_invest_0','budget_total','budget_alltotal')"
			/>
		</td>
		<td>
			<input type="text" style="text-align:right;width:230px" id="total_allot_12"  name="budget/invest_detail/invest[12]/total_allot" 
					class="required" label="其他费用中科技拨款"
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='12']/total_allot" />"
					onfocus="InitInput.setNumber(this,7,4,4)"  
					onchange="countFund('total_allot_','1,4,9,10,11,12','0');synkjpk('total_allot_0','total_source_1')"
			>
		</td>
	</tr>
</table>
<br>	
<div class="t_bar">经费来源预算（单位：万元）</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1">

	<tr class="t_tr">
		<td align="center" width="220">科目</td>
		<td class="TblHead" align="center" width="120">预算数（万元）</td>
	</tr>
	<tr class="li_1">
		<td align="left"><strong>来源预算合计：</strong></td>
		<td>
			<input type="hidden" name="budget/source_detail/detail[00]@source_code"  value="00">
			<input type="hidden" name="budget/source_detail/detail[00]/name" value="研究经费">
			<input type="text" name="budget/source_detail/detail[00]/total_source" id="total_source_0" 
					 disabled id="total_source_0" style="text-align:right; width:230px;" 
					 class="gray"
					 value="<x:out select="$xmlData/data/budget/source_detail/detail[@source_code='00']/total_source" />" />
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:20px">1、科技拨款</td>
		<td>
			<input type="hidden" name="budget/source_detail/detail[01]@source_code"  value="01">
			<input type="hidden" name="budget/source_detail/detail[01]/name" value="科技拨款">
			<input type="text" name="budget/source_detail/detail[01]/total_source"  id="total_source_1" 
					onfocus="InitInput.setNumber(this,7,4,4)" class="required gray" label="经费来源预算中科技拨款"  id="total_source_1"  disabled
					style="text-align:right; width:230px;" value="<x:out select="$xmlData/data/budget/source_detail/detail[@source_code='01']/total_source" />" 
					onchange="countFund('total_source_','1,2,3,4','0');" 

			/>
		</td>
	</tr>
	<tr class="li_1">
		<td align="left" style="padding-left:20px">2、贷    款</td>
		<td>
			<input type="hidden" name="budget/source_detail/detail[02]@source_code"  value="02">
			<input type="hidden" name="budget/source_detail/detail[02]/name" value="贷    款">
			<input type="text" name="budget/source_detail/detail[02]/total_source"  id="total_source_2" 
					 onfocus="InitInput.setNumber(this,7,4,4)" 
					 class="required" label="经费来源预算中贷款"  id="total_source_1" style="text-align:right; width:230px;" 
					 value="<x:out select="$xmlData/data/budget/source_detail/detail[@source_code='02']/total_source" />" 
			
			onchange="countFund('total_source_','1,2,3,4','0');" 

			/>
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:20px">3、单位自筹</td>
		<td>
			<input type="hidden" name="budget/source_detail/detail[03]@source_code"  value="03">
			<input type="hidden" name="budget/source_detail/detail[03]/name" value="单位自筹">
			<input type="text" name="budget/source_detail/detail[03]/total_source"  id="total_source_3" class="required" 
						onfocus="InitInput.setNumber(this,7,4,4)" class="required" label="经费来源预算中单位自筹"
						id="total_source_1" style="text-align:right; width:230px;" 
						value="<x:out select="$xmlData/data/budget/source_detail/detail[@source_code='03']/total_source" />" 
			
						onchange="countFund('total_source_','1,2,3,4','0');" 

			/>
		</td>
	</tr>
	<tr class="li_1">
		<td align="left" style="padding-left:20px">4、其它来源</td>
		<td>
			<input type="hidden" name="budget/source_detail/detail[04]@source_code"  value="04">
			<input type="hidden" name="budget/source_detail/detail[04]/name" value="其它来源">
			<input type="text" name="budget/source_detail/detail[04]/total_source"  id="total_source_4" 
				 onfocus="InitInput.setNumber(this,7,4,4)" class="required" label="经费来源预算中其它来源"  
					id="total_source_1" style="text-align:right; width:230px;" 
					value="<x:out select="$xmlData/data/budget/source_detail/detail[@source_code='04']/total_source" />" 
			
			onchange="countFund('total_source_','1,2,3,4','0');" 
			/>
		</td>
	</tr>
	<tr class="li_2">
		<td align="left" style="padding-left:20px">5、经费来源备注（限200字）</td>
		<td>
			<textarea rows="7" cols="100" class="input_textarea required" class="required maxlength:200" label="经费来源预算中经费来源备注"   name='budget/source_detail/summary' title="对项目经费来源情况的补充信息"><x:out select="$xmlData/data/budget/source_detail/summary"/></textarea>
		</td>
	</tr>
	</table>
<script type="text/javascript">
	function synkjpk(id1,id2){
	     $('#'+id2).val($('#'+id1).val());
	}
	function synamt(id1,id2,totalid){
		var fund1 = $("#" +id1).val();
		var fund2 = $("#" +id2).val();
		if (!$.isNumeric(fund1))
			fund1 = "0";
		if (!$.isNumeric(fund2))
			fund2 = "0";
		var count = 0 ;
		count = ((parseFloat(fund1)*10000 + parseFloat(fund2)*10000)/10000).toFixed(4);
		$('#'+totalid).val(count);
	}
	function countNum1(idStart, countStr, totalStr) {

		var indexs = countStr.split(",");
		var count = 0;
		for ( var i = 0; i < indexs.length; i++) {
			var fund = $("#" + idStart + indexs[i]).val();
			if (!$.isNumeric(fund))
				fund = "0";
			count = ((parseFloat(count)*10000 + parseFloat(fund)*10000)/10000).toFixed(4);
		}

		count = formatNumber(count.toString(), 9, 4, 4);// 格式化金额
		$("#" + idStart + totalStr).val(count);
	}
</script>
